<?php

/**
 * Referir form.
 *
 * @package    cronos-doctrine
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ReferirForm extends BaseReferirForm
{
  public function configure()
  {   
      unset (
        $this['created_at'],
        $this['updated_at']
      );
      
      $this->widgetSchema['empresa_id'] = new sfWidgetFormInputHidden(array(),array('value'=> sfContext::getInstance()->getUser()->getAttribute('agente_user_empresa_id')));
      
     //$this->widgetSchema['producto_id'] = new sfWidgetFormInputHidden();

     $this->validatorSchema['email'] = new sfValidatorAnd(array(
          $this->validatorSchema['email'],
          new sfValidatorEmail(),
     ));

     $this->widgetSchema['celular'] = new sfWidgetFormInput(array(),
             array('maxlength'=>11));

//     $this->validatorSchema['celular'] = new sfValidatorNumber(array(
//        'required' => false,
//         'max' => 11,
//        'min' => 10
//
//     ));
     
}
}
